#! /bin/csh -f
# Test example 5
# Ton Rullmann and Jurgen Doreleijers 
#  - output filtering suggested by Kris Boulez

echo ""
echo "Test Example 5: complchk script"
echo "---------------------------"
#echo "Aqua directory:" $aquaroot
echo ""

\cp $aquaroot/exmpls/Test_Big.pdb .
\cp $aquaroot/exmpls/Test_Big.noe .
\rm aqua.cmm >& /dev/null

$aquaroot/scripts/complchk Test_Big.pdb > /dev/null

echo "=================================================================="
echo "Differences for output file complchk.log:"
echo "=================================================================="

diff complchk.log $aquaroot/exmpls | gawk '{ tus = $0; getline \
    if (($0 !~ /Reading lower/ ) && ($0 !~ /^..Now opening/ ) &&\
        ($0 !~ /StereoLIB-aqua/ ) && ($0 !~ /PseudoLIB-aqua/ ) && \
        ($0 !~ /Aqua program directory:/) && ($2 !~ /^[0-9].[0-9]u$/)) \
    { print tus; print $0 } }' -
echo ""

echo "=================================================================="
echo "Differences for output file Test_Big_comp_str.comp:"
echo "=================================================================="

diff Test_Big_comp_str.comp $aquaroot/exmpls | gawk '{ tus = $0; getline \
    if (($0 !~ /CREATED/ ) && ($2 !~ /^[0-9].[0-9]u$/)) \
    { print tus; print $0 } }' -

